/*
 * @Description: 
 * @Author: nxd
 * @Date: 2023-02-19 15:50:25
 * @LastEditors: nxd
 * @LastEditTime: 2023-02-20 11:15:26
 */
import { defineStore } from "pinia";
import { addUserIdentity } from "@/services/identity";

export const useIdentityRelStore = defineStore('identityStore', () => {
const IdentityRel =(name,idNumber) => {
    // console.log(name,idNumber);
    // const res = addUserIdentity(name,idNumber)
    // console.log('1',res);
    // return res
   addUserIdentity(name,idNumber).then(res=>{
    console.log(res);
    if(res.data.code = 20000){
        setTimeout(() => {
        Snackbar.success("提交成功")
    }, 1000)
    }else{
        setTimeout(()=>{
        Snackbar.error(res.data.message)
    },1000)
    }
   })

}

return {
    IdentityRel
}

})